<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
	<title>Add new course</title>
	<script type="text/javascript" src="scripts.js"></script>
	<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body onload="javascript:resizeWin()"> 
<div style="overflow: hidden">
	<% if (request.getSession(true).getAttribute("NewCourseError") != null){ %>
		<span class="errorMessage"><%= request.getSession(true).getAttribute("NewCourseError").toString() %></span>
		<% request.getSession(true).removeAttribute("NewCourseError");
		} %> 
	<form id="courseDetails" action="/skiryanoandspuzir/Courses" method="post" style="width: 300px" onsubmit="javascript:return validateAddCourse('courseDetails');">
		<table>
			<tr> 
				<td>Course Name:</td><td><input type="text" name="courseName" id="courseName" /></td>
			</tr>
			<tr>
				<td>Description:</td><td><input type="text" name="description" id="description" /></td>
			</tr>
			<tr>
				<td>Points:</td><td><input type="text" name="numOfpts" id="numOfpts" /></td>
			</tr>
			<tr>
				<td>Capacity:</td><td><input type="text" name="capacity" id="capacity" /></td>
			</tr>
			<tr>
				<td>Group Num:</td><td><input type="text" name="groupNum" id="groupNum" /></td>
			</tr>
		</table>
		<div>
			<input type="button" value="Add Session" onclick="javascript:addRow('addCourse');resizeWin();" />
			<input type="button" value="RemoveSession" onclick="javascript:deleteRow('addCourse');resizeWin();" />
		</div>
		<table id="addCourse" border="1">
			<tr>
				<th></th><th>Day</th><th>Starting slot</th><th>Duration</th>
			</tr>
			<tr>
				<td><input type="checkbox" name="chk"/></td>
				<td>
					<select name="day">
						<option value="1">Sunday</option>
						<option value="2">Monday</option>
						<option value="3">Tuesday</option>
						<option value="4">Wednesday</option>
						<option value="5">Thursday</option>
						<option value="6">Friday</option>
						<option value="7">Saturday</option>
					</select>
				</td>
				<td>
                	<select name="start">
						<option value="1">1</option>
						<option value="2">2</option>
						<option value="3">3</option>
						<option value="4">4</option>
						<option value="5">5</option>
						<option value="6">6</option>
						<option value="7">7</option>
						<option value="8">8</option>
						<option value="9">9</option>
						<option value="10">10</option>
					</select>
				</td>
				<td>
					<select name="duration">
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                </select>
            </td>
        </tr>
    </table>
	<div><input type="submit" value="Submit" name="addCourse" /></div>
	</form>
	</div>
</body>
</html>